<template>
  <div>
    <homeMenu/>
    <div v-if="showOn" class="farm">
      <div class="comming">
        <div class="comming-box">
          <img class="left-img" src="../assets/farm-icon-tag.png" alt="">
          <img class="right-img" src="../assets/farm-icon-tag-bg.png" alt="">
          <div class="time">
            <img src="../assets/farm-icon-time.png" alt="">
            <div>{{$t('user.COMINGSOON2')}}</div>
          </div>
          <div class="middle-img">
            <img src="../assets/farm-nbc-nbi.png" alt="">
            <img src="../assets/nbc-logo.png" alt="">
          </div>
          <div class="farm-text1">NBC/TRX {{$t('user.planet')}}</div>
          <div class="farm-text2">
            <span>0</span> 
            <span>%</span>
          </div>
          <div class="farm-text3">{{$t('user.APY')}}</div>
          <div class="farm-btn" @click="jumpOn(1)">{{$t('user.Enter')}}</div>
          <!-- <div class="farm-link">
            <span>{{$t('user.ContractAddress')}}</span>
            <img src="../assets/farm-icon-more.png" alt="">
          </div> -->
        </div>
      </div>
      <div class="ending">
        <div class="end-box">
          <img class="right-img" src="../assets/farm-icon-tag-grey-bg.png" alt="">
          <div class="time">
            <img src="../assets/farm-icon-time.png" alt="">
            <div>{{$t('user.COMINGSOON2')}}</div>
          </div>
          <div class="middle-img">
            <img src="../assets/farm-nbi-trx.png" alt="">
            <img src="../assets/nbc-logo.png" alt="">
          </div>
          <div class="farm-text1">NBI/TRX {{$t('user.planet')}}</div>
          <div class="farm-text2">
            <span>0</span> 
            <span>%</span>
          </div>
          <div class="farm-text3">{{$t('user.APY')}}</div>
          <div class="farm-btn" @click="jumpOn(2)">{{$t('user.Enter')}}</div>
          <!-- <div class="farm-link">
            <span>{{$t('user.ContractAddress')}}</span>
            <img src="../assets/farm-icon-more.png" alt="">
          </div> -->
        </div>
      </div>
    </div>
    <div v-else>
      <div class="ming-return" @click="showOn = true">
        <img src="../assets/return.svg" alt="">
      </div>
      <farmNBIneiPage :neiType="neiType"></farmNBIneiPage>
    </div>
    <homeFooter/>
  </div>
</template>

<script>
  import farmNBIneiPage from './farmNBIneiPage'
import homeMenu from './public/homeMenu'
import homeFooter from './public/homeFooter'
export default {
  name: 'farmNBIPage',
  data () {
    return {
      showOn:true,
      neiType:1
    }
  },
  components:{
    farmNBIneiPage,
    homeFooter,
    homeMenu
  },
  mounted() {
    this.showOn = true;
  },
  methods: {
    jumpOn(num){
      this.neiType = num;
      this.showOn = false;
    }
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
  @media only screen and (min-width: 0px) and (max-width: 639px){
         
    .ming-return{
      width: 62px;
      height: 28px;
      border: 1px solid rgba(255, 255, 255, 0.7);
      border-radius: 10px;
      padding: 0px 15px;
      position: absolute;
      top: 81px;
      left: 23px;
      z-index: 1000;
      img{
        position: relative;
        top: 7px;
      }
    }
    .farm{
      padding-top: 130px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-around;
      .comming:hover{        
        background-image: linear-gradient(to bottom, #FF0000, #FEE156);
      }
      .comming{
        box-sizing: border-box;
        padding: 4px;
        border-radius: 40px;
        /* background-image: linear-gradient(to bottom, #FF0000, #FEE156); */
        margin-bottom: 40px;
        >.comming-box{
          width: 300px;
          height: 465px;
          background-color: black;
          border-radius: 40px;  
          position: relative;
          >.left-img{
            position: absolute;
            top: 22px;
            left: 21px;
            width: 47px;
          }
        }
      }
      .end-box{
        width: 300px;
        height: 471px;
        background-color: black;
        border-radius: 40px;  
        border: 1px solid rgba(255, 255, 255, .2); 
        position: relative;
        >.farm-btn{
          /* background-color: rgba(255, 255, 255, .4); */
          /* cursor: not-allowed; */
        }
        >.time{
          right: -7px;
          top: 9px;
        }
      }
      .right-img{
        position: absolute;
        top: 0px;
        right: 0px;
      }
      .time{
        font-size: 16px;
        position: absolute;
        right: -8px;
        top: 8px;
        transform: rotate(45deg);
        img{
          width: 30px;
        }
        div{
          text-align: center;
        }
      }
      .middle-img{
        padding-top: 67px;
        position: relative;
        margin-bottom: 6px;
        img:nth-child(2){
          width:43px;
          position: absolute;
          left: calc(50% + 21px);
          bottom: 15px;
        }
      }
      .farm-text1{
        font-size: 24px;
      }
      .farm-text2{
        color: #FEDA4E;
        margin-bottom: 10px;
        font-family: axis;
        span:nth-child(1){
          font-size: 48px;
          margin-right: 8px;
        }
        span:nth-child(2){
          font-size: 24px;
        }
      }
      .farm-text3{
        color: #FEDE50;
        font-size: 16px;
        margin-bottom: 40px;
      }
      .farm-btn{
        width: 240px;
        height: 40px;
        margin: 0 auto;
        line-height: 40px;
        background-color: #fff;
        border-radius: 10px;
        font-size: 16px;
        color: #000;
        margin-bottom: 30px;
        cursor: pointer;
      }
      .farm-link{
        font-size: 14px;
        line-height: 20px;
        cursor: pointer;
        span{
          margin-right: 7px;
        }
      }
    }
  }
  @media only screen and (min-width: 639px){    
    .ming-return{
      width: 90px;
      height: 30px;
      border: 1px solid rgba(255,255,255,.7);
      border-radius: 10px;
      padding: 0px 15px;
      position: relative;
      top: 137px;
      left: 5%;
      z-index: 1000;
      img{
        position: relative;
        top: 7px;
      }
      cursor: pointer;
    }
    .farm{
      padding-top: 206px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-around;
      /* >div:nth-child(3n+3) {
        margin-right: 0px;
      } */      
      .comming:hover{        
        background-image: linear-gradient(to bottom, #FF0000, #FEE156);
        border:none;
        box-sizing: border-box;
        padding: 4px;
      }
      .comming{
        box-sizing: border-box;
        border-radius: 40px;
        border-radius: 40px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        /* background-image: linear-gradient(to bottom, #FF0000, #FEE156); */
        >.comming-box{
          width: 360px;
          height: 465px;
          background-color: black;
          border-radius: 40px;  
          position: relative;
          >.left-img{
            position: absolute;
            top: 22px;
            left: 21px;
            width: 47px;
          }
        }
      }
      .ending:hover{        
        background-image: linear-gradient(to bottom, #FF0000, #FEE156);
        border:none;
        box-sizing: border-box;
        padding: 4px;
      }
      .ending{
        box-sizing: border-box;
        border-radius: 40px;
        border-radius: 40px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        .end-box{
          width: 360px;
          height: 471px;
          background-color: black;
          border-radius: 40px;  
          border: 1px solid rgba(255, 255, 255, .2); 
          position: relative;
          >.farm-btn{
            /* background-color: rgba(255, 255, 255, .4); */
            /* cursor: not-allowed; */
          }
          >.time{
            right: -8px;
            top: 9px;
          }
        }
      }
      .right-img{
        position: absolute;
        top: 0px;
        right: 0px;
      }
      .time{
        font-size: 16px;
        position: absolute;
        right: -8px;
        top: 9px;
        transform: rotate(45deg);
        img{
          width: 30px;
        }
        div{
          text-align: center;
        }
      }
      .middle-img{
        padding-top: 67px;
        position: relative;
        margin-bottom: 6px;
        img:nth-child(2){
          width:43px;
          position: absolute;
          left: calc(50% + 21px);
          bottom: 15px;
        }
      }
      .farm-text1{
        font-size: 24px;
      }
      .farm-text2{
        color: #FEDA4E;
        margin-bottom: 10px;
        font-family: axis;
        span:nth-child(1){
          font-size: 48px;
          margin-right: 8px;
        }
        span:nth-child(2){
          font-size: 24px;
        }
      }
      .farm-text3{
        color: #FEDE50;
        font-size: 16px;
        margin-bottom: 40px;
      }
      .farm-btn{
        width: 288px;
        height: 40px;
        margin: 0 auto;
        line-height: 40px;
        background-color: #fff;
        border-radius: 10px;
        font-size: 16px;
        color: #000;
        margin-bottom: 30px;
        cursor: pointer;
      }
      .farm-link{
        font-size: 14px;
        line-height: 20px;
        cursor: pointer;
        span{
          margin-right: 7px;
        }
      }
    }
  }
</style>
